From 92205744d21e87d893884c40804d8e617c675744 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 29 Apr 2023 09:20:07 -0400 Subject: [PATCH] entry: Ignore the baseline when centering GtkEntry was always placing its text on the baseline, even when the valign said something else. --- gtk/gtkentry.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 0b76c9de79..69af1b00f2 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -1706,6 +1706,9 @@ gtk_entry_size_allocate (GtkWidget *widget, text_alloc.width = width; text_alloc.height = height; + if (gtk_widget_get_valign (widget) != GTK_ALIGN_BASELINE) + baseline = -1; + for (i = 0; i < MAX_ICONS; i++) { EntryIconInfo *icon_info = priv->icons[i]; -- 2.30.2